package com.ethink.order.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.order.api.info.SaleDemandOrderInfo;
import com.ethink.order.api.info.SaleDemandOrderModeInfo;
import com.ethink.order.api.model.PreSuppleOrderDetailModel;
import com.ethink.order.api.request.*;
import com.ethink.order.api.response.SaleDemandOrderAddResponse;
import com.ethink.order.api.response.SaleDemandOrderDeleteResponse;
import com.ethink.order.api.response.SaleDemandOrderDetailResponse;
import com.ethink.order.common.entity.SaleDemandOrderDetail;

import java.util.List;

/**
 * 销售需求单 Service接口
 *
 * @author default
 * @date 2022-10-31
 */
public interface SaleDemandOrderService {

    /**
     * 分页查询
     *
     * @param request
     * @return
     */
    Page<SaleDemandOrderInfo> querySaleDemandOrder(SaleDemandOrderQueryRequest request);

    /**
     * 查询详情
     *
     * @param orderNo
     * @return
     */
    SaleDemandOrderDetailResponse getSaleDemandOrderByNo(String orderNo);

    /**
     * 查询列表
     *
     * @param request
     * @return
     */
    List<SaleDemandOrderInfo> listSaleDemandOrder(SaleDemandOrderQueryRequest request);

    /**
     * 新增
     *
     * @param request
     * @return
     */
    SaleDemandOrderAddResponse addSaleDemandOrder(SaleDemandOrderAddRequest request);

    /**
     * 删除
     *
     * @param saleDemandOrderId
     * @return
     */
    SaleDemandOrderDeleteResponse deleteSaleDemandOrder(Long saleDemandOrderId);

    /**
     * 更新订单状态
     *
     * @param orderNo
     */
    void updateStatus(String orderNo, Integer status);

    SaleDemandOrderDetail oaPass(OAPassRequest request);

    Page<PreSuppleOrderDetailModel> pageQueryByPreSupple(PreSupplePageQueryRequest request);

    String update(SaleDemandOrderUpdateRequest request);

    Integer updateRemark(SaleDemandUpdateRemarkRequest request);

    SaleDemandOrderInfo queryMainByOrderNo(String orderNo);

    /**
     * 货品模式分页查询
     *
     * @param request
     * @return
     */
    Page<SaleDemandOrderModeInfo> querySaleDemandOrderMode(SaleDemandOrderQueryModeRequest request);

}